home *** CD-ROM | disk | FTP | other *** search
/ HamCall (April 1991) / HAMCALL CD-ROM (Buckmaster)(April 1991).BIN / prgming / ctutor / mortypes.c < prev    next >
Text File  |  1990-10-14  |  776b  |  28 lines

  1.                                          /* Chapter 4 - Program 2 */
  2. /* The purpose of this file is to introduce additional data types */
  3.  
  4. main()
  5. {
  6. int a,b,c;            /* -32768 to 32767 with no decimal point */
  7. char x,y,z;           /* -128 to 127 with no decimal point     */
  8. float num,toy,thing;  /* 3.4E-38 to 3.4E+38 with decimal point */
  9.  
  10.    a = b = c = -27;
  11.    x = y = z = 'A';
  12.    num = toy = thing = 3.6792;
  13.  
  14.    a = y;           /* a is now 65 (character A)               */
  15.    x = b;           /* x is now -27                            */
  16.    num = b;         /* num will now be -27.00                  */
  17.    a = toy;         /* a will now be 3                         */
  18.  
  19. }
  20.  
  21.  
  22.  
  23. /* Result of execution
  24.  
  25. (No output from this program.)
  26.  
  27. */
  28.